package com.apes.autoparts.product.repository;

import com.apes.autoparts.product.model.BulbProduct;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Map;

/**
 * 类描述：
 *
 * @ClassName bulbProductRepository
 * @Description 描述
 * @Author wushilong
 * @Date 2022/10/26 17:40
 * @Version 1.0
 */
public interface BulbProductRepository extends CustomRepository<BulbProduct, String> {

    @Query(value = "select a.id as id from BulbProduct a where a.brand = :brand and a.name = :name and a.unit = :unit and a.model = :model")
    Map<String, String> queryByCondition(String brand, String name, String unit, String model);
}
